<template>
  <div>
    <div v-if="flag" class="box">
      <div class="main">
        <h1>{{ title }}</h1>
        <slot></slot>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: '',
  props: {
    flag: {
      type: Boolean
    },
    title: {
      type: String
    }
  },

  data () {
    return {
    }
  },
  created () {
  },
  computed: {
  },
  methods: {

  }
}
</script>
<style lang='less'  scoped>
.box {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  height: 50%;
  background: rgba(28, 26, 26, 0.5);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  color: red;
  .main {
    flex: 1;
  }
}
</style>
